package com.ada.daytasks;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

import com.activeandroid.app.Application;

/**
 * 顺便看小说管理程序资源
 * 
 * @author Administrator
 * 
 */
// public class MainApplication extends ImageLoaderApplication {
public class MainApplication extends Application {

	public boolean isonline() {
		ConnectivityManager cManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo info = cManager.getActiveNetworkInfo();
		if (info != null && info.isAvailable()) {
			// do something
			// 能联网
			return true;
		} else {
			// 不能联网
			return false;
		}
	}
}
